/*
 * @(#)ServiceCondition.java $version 2010. 8. 11
 *
 * Copyright 2007-2010 NHN Corp. All rights Reserved. 
 * NHN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */
package com.nhncorp.usf.core.config.runtime;

import com.nhncorp.usf.core.service.ServiceType;

/**
 * 조건 정보.
 *
 * @author Web Platform Development Team
 */
public class ServiceCondition extends ServiceImpl implements Service {
    private boolean check = false;
    private String condition;

    private ScriptInfo scriptInfo;
    private ScriptInfo commonScriptInfo;

    /**
     * 조건검사 여부를 가져온다
     *
     * @return check the condition exist or don't exist
     */
    public boolean isCheck() {
        return check;
    }

    /**
     * 조건 검사 여부를 설정한다
     *
     * @param check the condition exist or don't exist
     */
    public void setCheck(boolean check) {
        this.check = check;
    }

    /**
     * 조건 검사식을 가져온다
     *
     * @return condition the condition string value
     */
    public String getCondition() {
        return condition;
    }

    /**
     * 조건 검사식을 설정한다.
     *
     * @param condition the condition string value
     */
    public void setCondition(String condition) {
        this.condition = condition;
    }

    /**
     * Gets the script info.
     *
     * @return the script info
     */
    public ScriptInfo getScriptInfo() {
        return scriptInfo;
    }

    /**
     * Sets the script info.
     *
     * @param scriptInfo the new script info
     */
    public void setScriptInfo(ScriptInfo scriptInfo) {
        this.scriptInfo = scriptInfo;
    }

    /**
     * Gets the common script info.
     *
     * @return the common script info
     */
    public ScriptInfo getCommonScriptInfo() {
        return commonScriptInfo;
    }

    /**
     * Sets the common script info.
     *
     * @param commonScriptInfo the new common script info
     */
    public void setCommonScriptInfo(ScriptInfo commonScriptInfo) {
        this.commonScriptInfo = commonScriptInfo;
    }

	@Override
	public ServiceType getServiceType() {
		return ServiceType.conditionBlock;
	}
}
